<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Facility Management</title>
<link rel="shortcut icon" href="<?php echo base_url() ?>static/images/" /> <? //logoTelkomsel-favico.png ?>
<link href="<?php echo base_url() ?>static/css/bootstrap.css" rel="stylesheet"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>static/css/main.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>static/select2/select2.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>static/select2/select2-bootstrap.css" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>static/css/jquery.datetimepicker.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>static/js/Metro-UI-CSS/min/iconFont.min.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>static/css/print.css" />
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/jquery-excel-export/jquery.btechco.excelexport.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/jquery-excel-export/jquery.base64.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/jquery.printElement.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/bootstrap.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>static/js/jquery.validate.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/form.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/select2/select2.min.js" /></script>
<script type="text/javascript" src="<?php echo base_url(); ?>static/js/select.js" /></script>
<script>
	$(".alert").alert();
	window.setTimeout(function() {$(".alert").fadeTo(400, 0).slideDown(400, function(){$(this).remove();});}, 3000);
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function()
{
	$('input[type="checkbox"]').change(function(e) 
	{
		var checked = $(this).prop("checked"),
		container = $(this).parent(),
		siblings = container.siblings();	
		container.find('input[type="checkbox"]').prop({indeterminate: false,checked: checked});
		
		function checkSiblings(el)
		{
			var parent = el.parent().parent(),
			all = true;
			el.siblings().each(function() {return all = ($(this).children('input[type="checkbox"]').prop("checked") === checked);});
			if (all && checked) 
			{
				parent.children('input[type="checkbox"]').prop({indeterminate: false,checked: checked});
				checkSiblings(parent);
			} 
			else if (all && !checked) 
			{
				parent.children('input[type="checkbox"]').prop("checked", checked);
				parent.children('input[type="checkbox"]').prop("indeterminate", (parent.find('input[type="checkbox"]:checked').length > 0));
				checkSiblings(parent);
			} 
			else
			{
				el.parents("li").children('input[type="checkbox"]').prop({indeterminate: true,checked: true});
			}
		}
		checkSiblings(container);
	});
});
</script>
</head>
<body style="padding-top:70px">
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation" style="background-color:#d2322d;">
	<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
				<span class="sr-only">Toggle navigation</span>
				<span class="icon-list"></span>
			</button>
			<!--img class="img-responsive" src="<?php echo base_url();?>static/images/" style="height:50px; float:left; background-color:white; padding:0 15px;" /-->  <? //logo_telkomsel.png ?>
			<!--<a class="navbar-brand" href="#">Administrator</a>-->
        </div>
        <div class="navbar-collapse collapse">
			<ul class="nav navbar-nav navbar-right">
				<?php
					//echo '<ul class="nav navbar-nav dropdown">'; 
					$menu = getMenu();
					foreach($menu as $menu)
					{
						if(count($menu['child']) > 0)
						{
							echo '<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" style="cursor:pointer;">'.$menu['P_NAME'];
							echo '<b class="caret"></b></a>';
							echo '<ul class="dropdown-menu">';
							foreach ($menu['child'] as $child)
							{
								if( $child['P_TAG'] == 'lkd')
								{echo '<li><a href="'.$child['P_URL'].'" target="_blank" style="cursor:pointer;">'.$child['P_NAME'].'</a></li>';}
								else
								{echo '<li><a href="'.base_url().$menu['P_TAG'].$child['P_URL'].'">'.$child['P_NAME'].'</a></li>';}
							}
							echo '</ul></li>';
						}
						else
						{

							echo '<li><a href="'.base_url().$menu['P_TAG'].'" style="cursor:pointer;">'.$menu['P_NAME'].'</a></li>';
						}
					}
					//echo '</ul>';
				?>
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="cursor:pointer;">
						<?php echo $this->session->userdata['login']['name']; ?> <b class="caret"></b>
					</a>
					<ul class="dropdown-menu">
						<li>
							<?php //echo "<pre>"; echo $this->session->userdata('login'); echo "</pre>"; ?>
							<?php //var_dump($this->session->userdata('login')); ?>
							<div style="margin:5px; padding:5px; background-color:white; border-radius:4px; border:solid 1px #aaa; background-color:#eee; text-align:left;">
								
								<table style="border:none;">
									<tr style="border:none;">
										<td style="border:none;">NIK</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['nid'] ; ?></td>
									</tr>
									<tr style="border:none;">
										<td style="border:none;">Nama</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['name'] ; ?></td>
									</tr>
									<tr style="border:none;">
										<td style="border:none;">Departemen</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['org'] ; ?></td>
									</tr>
									<tr style="border:none;">
										<td style="border:none;">Position</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['jobposition'] ; ?></td>
									</tr>
									<tr style="border:none;">
										<td style="border:none;">Email</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['email'] ; ?></td>
									</tr>
									<tr style="border:none;">
										<td style="border:none;">Phone</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['msisdn'] ; ?></td>
									</tr>
									<tr style="border:none;">
										<td style="border:none;">Role</td>
										<td style="border:none;">&nbsp;:&nbsp;</td>
										<td style="border:none;"><?php echo $this->session->userdata['login']['LEVEL'] ; ?></td>
									</tr>
								</table>
								
							</div>
						</li>
						<li class="divider"></li>
						<li><a href="<?php echo base_url(); ?>logout/index">Logout</a></li>
					</ul>
				</li>
			</ul>
        </div>
    </div>
</div>
<div class="container">
	<div class="col-md-offset-1">
		<div class="col-md-11">		
			<?php if(strlen($this->session->userdata('success')) > 0){ ?>
			<div class="alert alert-dismissable alert-success"><?php echo $this->session->userdata('success'); $this->session->unset_userdata('success'); ?></div>
			<?php }else if(strlen($this->session->userdata('warning')) > 0){ ?>
			<div class="alert alert-dismissable alert-warning"><?php echo $this->session->userdata('warning'); $this->session->unset_userdata('warning'); ?></div>
			<?php }else if(strlen($this->session->userdata('danger')) > 0){ ?>
			<div class="alert alert-dismissable alert-danger"><?php echo $this->session->userdata('danger'); $this->session->unset_userdata('danger'); ?></div>
			<?php } ?>
		</div>
	</div>
</div>
<div class="container">
	<div class="col-md-offset-1">
		<div class="col-md-11">
			<?php 
			$uri_1 = strtoupper(str_replace("_"," ",$this->uri->segment(1)));
			$uri_2 = strtoupper(str_replace("_"," ",$this->uri->segment(2)));
			if ($uri_2 == "")
			{
				echo '<ol class="breadcrumb label-info" style="color:white;"><li><small>'.$uri_1.'</small></li></ol>';
			}
			else
			{
				echo '<ol class="breadcrumb label-info" style="color:white;"><li><small>'.$uri_1.'  '.
				'<span class="icon-arrow-right-4"></span>'.' '.$uri_2.'</small></li></ol>';
			}
			?>
		</div>
	</div>
</div>
